<?php

namespace Admin\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Categories
 *
 * @ORM\Table(name="categories")
 * @ORM\Entity
 */
class Categories
{
    /**
     * @var integer
     *
     * @ORM\Column(name="ctgr_id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $ctgrId;

    /**
     * @var string
     *
     * @ORM\Column(name="ctgr_name", type="string", length=100, nullable=false)
     */
    private $ctgrName;

    /**
     * @var \Doctrine\Common\Collections\Collection
     *
     * @ORM\ManyToMany(targetEntity="Admin\Entity\Articles", mappedBy="ctgr")
     */
    private $artc;

    /**
     * Constructor
     */
    public function __construct()
    {
        $this->artc = new \Doctrine\Common\Collections\ArrayCollection();
    }


    /**
     * Get ctgrId
     *
     * @return integer 
     */
    public function getCtgrId()
    {
        return $this->ctgrId;
    }

    /**
     * Set ctgrName
     *
     * @param string $ctgrName
     * @return Categories
     */
    public function setCtgrName($ctgrName)
    {
        $this->ctgrName = $ctgrName;

        return $this;
    }

    /**
     * Get ctgrName
     *
     * @return string 
     */
    public function getCtgrName()
    {
        return $this->ctgrName;
    }

    /**
     * Add artc
     *
     * @param \Admin\Entity\Articles $artc
     * @return Categories
     */
    public function addArtc(\Admin\Entity\Articles $artc)
    {
        $this->artc[] = $artc;

        return $this;
    }

    /**
     * Remove artc
     *
     * @param \Admin\Entity\Articles $artc
     */
    public function removeArtc(\Admin\Entity\Articles $artc)
    {
        $this->artc->removeElement($artc);
    }

    /**
     * Get artc
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getArtc()
    {
        return $this->artc;
    }
}
